package org.flexharmony.harmonizer.javadef;

import org.flexharmony.ASField;
import org.flexharmony.ASTransient;

/**
 * A Java field that is a candidate for transformation into a ActionScript field.
 * 
 * @author Corey Baswell
 *
 */
public class JavaFieldDefinition
{
  public final String name;
  /**
   * If true this Java field had an {@link ASTransient} annotation and should
   * not be transformed into an ActionScript field.
   */
  public final boolean asTransient;
  
  /**
   * The {@link ASField} annotation found on this field or null if not present.
   */
  public final ASField asField;
  
  /**
   * true if this field is static. false otherwise.
   */
  public final boolean isStatic;
  
  /**
   * true if this field is final. false otherwise.
   */
  public final boolean isFinal;

  /**
   * The visibility of this field.
   */
  public final JavaVisibility visibility;
  
  /**
   * The field type.
   */
  public final JavaType type;
  
  /**
   * The initialization value for this field or null if not present.
   */
  public final Object initializationValue;

  public JavaFieldDefinition(String name, boolean asTransient, ASField asField, Object initializationValue, 
      boolean isStatic, boolean isFinal, JavaType type, JavaVisibility visibility)
  {
    this.name = name;
    this.asTransient = asTransient;
    this.asField = asField;
    this.initializationValue = initializationValue;
    this.isStatic = isStatic;
    this.isFinal = isFinal;
    this.type = type;
    this.visibility = visibility;
  }
}
